<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<%@ page import="com.chanyachting.emall.util.*" %>
<%@ page import="java.util.*" %>

<%@ page import="com.chanyachting.emall.domain.*" %>
<%@ page import="com.chanyachting.emall.util.RequestUtil" %>
<%@ page import="com.chanyachting.emall.service.*" %>
<%@ page import="com.chanyachting.emall.serviceImpl.*" %>

<script type="text/javascript" src="<%=root %>/js/jquery-1.3.2.min.js" charset="utf-8">//ADCRM</script>

<script language="javascript" type="text/javascript">

	$(function(){
	
		$.ajaxSetup ({
		    cache: false //关闭AJAX相应的缓存
		});
		
	});


	//选择行业次分类 
	function changeBusinessCategory(bcategoryId){

		if(bcategoryId!=0){

			$.get("include/productcategoryList.jsp", { bcategoryId: bcategoryId },
					  function(data){
					    //alert("Data Loaded: " + data);
					    $("#productCategory").html(data);
					  });

		}

		

	}

</script>


<%

	RequestUtil ru=new RequestUtil(request);

	int btypeId=Integer.parseInt(ru.getParameter("btypeId","0"));
	
	List list=new ArrayList();
	
	if(btypeId==0){
		
		list=Businesscategory.list();  //如果没有行业分类编号，返回所有的行业次分类 
		
	}else{
		
		list=Businesscategory.listByBusinessTypeId(btypeId);
	}
%>

<select name="businessCategoryId" 
	size="5" 
	style="width:150px;font-size:12px"
	id="businessCategory" 
	onchange="changeBusinessCategory(this.value);">

<%	
	
	if(list!=null && list.size()>0){
		
		Businesscategory bcategory=null;
		
		for(int i=0;i<list.size();i++){
			
			bcategory=(Businesscategory)list.get(i);
%>
	<option value="<%= bcategory.getId() %>"><%=bcategory.getName() %></option>
<%
			
		}
		
	}else{
		
%>
	<option value="0">请选择</option>
<%		
	}

%>
</select>

